﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Fly.Common.Helper
{
    /// <summary>
    /// 数字类型扩展类
    /// </summary>
    public static class IntHelper
    {
        #region 使用进一法获取两数相除的最小整数
        /// <summary>
        /// 使用进一法获取两数相除的最小整数
        /// </summary>
        /// <param name="divisor">除数</param>
        /// <param name="dividend">被除数</param>
        /// <returns></returns>
        public static int GetCeil(int divisor, int dividend)
        {
            if (dividend == 0) throw new ArgumentException("被除数不能为0", "dividend");
            return (int)Math.Ceiling(divisor / (decimal)dividend);
        }
        #endregion

    }
}
